#include using namespace std; ////global variable //const int y = 9; // ////default argument //void fun(char c = 'w', int x = 12) //{ // cout << "fun " << c << " " << x << endl; //} // //void swap(int& y, int& x) //{ //} // //void main() //{ // char c = 'a'; // 1 byte- 1 char // fun('t'); // fun('s',54); // // if(c == 'b') // { // int x = 9; // int y = 99; // swap(x,y); // } // //swap(5,9); // //} void main() { //array - list of variables with a single name int grades[10]; int gradeCount; cout << "How many grades do you want to enter (0 to exit)? "; cin >> gradeCount; while(gradeCount > 0) { for(int i = 0; i < gradeCount; i++) { cout << "Grade " << i + 1 << "? "; cin >> grades[i]; //i is the subscript } for(int i = 0; i < gradeCount; i++) { cout << "Grade " << i + 1 << "= " << grades[i] << endl; } cout << "How many grades do you want to enter (0 to exit)? "; cin >> gradeCount; } }